xen/types: Correct the definition of uintptr_t
authorAndrew Cooper <andrew.cooper3@citrix.com>
Mon, 1 Aug 2016 12:36:44 +0000 (13:36 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 2 Aug 2016 09:33:06 +0000 (10:33 +0100)
commit2eee1c746af6f683247700642786b7c21c991234
treeac0e33c348ad39e89feee9a38a8e3deab7687174
parentcaefc852d5a3be3965a0c0131ce62e7f3a313f04
xen/types: Correct the definition of uintptr_t

uintptr_t is specified as unsigned int in 32bit, not unsigned long.  This is
why, when copying inttypes.h from GCC, the use of PRIxPTR and similar is
broken for 32bit builds.

Use __attribute__((__mode__(__pointer__))) to get the compilers default
pointer type, which matches the pre-existing inttypes.h

Fix the identified breakage with ELF_PRPTRVAL

Compile tested on all architectures, with a manual printk() to trigger any
potential -Wformat issues.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/include/xen/libelf.h
xen/include/xen/types.h